﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetExtensions.Core.Invoker
{
    public class MethodObject
    {
        public MethodObject(string moudle, string clazz, string method)
        {
            Moudle = moudle;
            Clazz = clazz;
            Method = method;
        }

        public string Moudle { get; set; }
        public string Clazz { get; set; }
        public string Method { get; set; }

        public object Invoke()
        {
            return null;
        }

        public static string Create(string moudle, string clazz, string method)
        {
            var invokeMethod = new MethodObject(moudle, clazz, method);
            return JsonConvert.SerializeObject(invokeMethod);
        }
        public static MethodObject Create(string JSON)
        {
            return JsonConvert.DeserializeObject<MethodObject>(JSON);
        }
    }
}
